package com.wang.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author WangZai
 * @since 2023-05-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@TableName(value = "medicine")
public class Medicine extends Model<Medicine> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "medicine_id", type = IdType.AUTO)
    private Integer medicineId;

    private Integer smallCategoryId;

    private Integer largeCategoryId;

    private String medicineName;

    private String pharmacology;

    private String indications;

    @TableField(value = "`usage`")
    private String usage;

    private String note;
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Boolean deleted;


    @Override
    protected Serializable pkVal() {
        return this.medicineId;
    }

}
